<template>
  <view class="content">
<!--    <image class="logo" src="@/static/logo.png"></image>
    <view class="text-area">
      <text class="title">基础设施管理系统</text>
    </view> -->
      <view>    
</view>
<!-- <uni-table ref="table" :loading="loading" border stripe type="selection" emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr>
					<uni-th width="150" align="center">id</uni-th>
					<uni-th width="150" align="center">用户</uni-th>
					<uni-th align="center">密码</uni-th>
					<uni-th width="204" align="center">是否管理员</uni-th>
            <uni-th width="204" align="center">操作</uni-th>
				</uni-tr>
	<uni-tr v-for="(item, index) in collect_userList.value" :key="index">
					<uni-td>{{ item.id }}</uni-td>
					<uni-td>
						<view class="name">{{ item.loginAccount }}</view>
					</uni-td>
					<uni-td align="center">{{ item.password }}</uni-td>
          <uni-td align="center">{{ item.isAdmin }}</uni-td>
					<uni-td>
						<view class="uni-group">
							<button class="uni-button" size="mini" type="primary" @click="xiu()">修改</button>
							<button class="uni-button" size="mini" type="warn">删除</button>
						</view>
					</uni-td>
				</uni-tr>
</uni-table> -->
  </view>
</template>

<script>
  import Vue from 'vue';
  import {ref} from 'vue';

import {
  listCollect_user,
  getCollect_user,
  delCollect_user,
  addCollect_user,
  updateCollect_user,
} from "@/api/collect_user/collect_user";
  export default {
    data(){
      return{
        loading: false, 
        form:{},
        collect_userList:[],
        queryParams: {
            pageNum: 1,
            pageSize: 10,
            loginAccount: null,
            password: null,
            areaId: null,
            isAdmin: null,
          },
      }
    },
    // mounted(){
    //   Vue.set(this, 'collect_userList', this.collect_userList);
    // },
    created() {

    },
    methods:{
      xiu(){
         console.log(this.collect_userList.value[0])
      },
     async  getList() {
		     this.loading = true;
		  try {
		            const response = await listCollect_user(this.queryParams);
		            this.collect_userList.value = response.rows;
		
		            this.$nextTick(() => {
		                this.loading = false;
		                // 假设uni-table组件有refresh方法用于刷新数据展示
		               // this.$refs.table.refresh();
		            });
		        } catch (error) {
		            console.error("获取用户列表数据失败：", error);
		            this.loading = false;
		        }
      },
    },

    onLoad: function() {
      // this.getList()
    
    }
  }
</script>

<style>
  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .logo {
    height: 200rpx;
    width: 200rpx;
    margin-top: 200rpx;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50rpx;
  }

  .text-area {
    display: flex;
    justify-content: center;
  }

  .title {
    font-size: 36rpx;
    color: #8f8f94;
  }
</style>

